package com.madou.dbtool.redis.panel.ui.types;

import com.madou.common.annotation.HideClass;
import com.madou.dbtool.redis.manager.RedisSourceManager;
import com.madou.dbtool.redis.panel.dataloader.RedisListTableDataLoader;
import com.madou.dbtool.ui.table.MColumn;

import java.util.ArrayList;
import java.util.List;

/**
 * String类型的预览面板
 * @author miukoo
 */
@HideClass
public class ListTypePanel extends OperatorPanel {

    private static List<MColumn> columns = new ArrayList<>();
    static {
        MColumn first = new MColumn();
        first.setName("first");
        first.setTitle("ID");
        first.setCanEdit(false);
        first.setWidth(50);
        columns.add(first);

        MColumn second = new MColumn();
        second.setName("second");
        second.setTitle("VAL");
        columns.add(second);
    }

    ListTypePanel(RedisSourceManager redisSourceManager, String selectKey,int dbIndex) throws Exception {
        super(redisSourceManager,new RedisListTableDataLoader(redisSourceManager,selectKey,dbIndex),selectKey,columns);
    }

}
